package com.cyan.note.entity;

import lombok.Data;
import lombok.EqualsAndHashCode;

import java.math.BigDecimal;

/**
 * 服务商品实体类
 * 对应数据库表: services
 * 
 * @author ZhangzhenYu
 * @since 2025-01-15
 */
@Data
@EqualsAndHashCode(callSuper = true)
public class Service extends BaseEntity {

    /**
     * 所属店铺ID
     */
    private Long shopId;

    /**
     * 服务编号
     */
    private String serviceCode;

    /**
     * 服务名称
     */
    private String serviceName;

    /**
     * 服务描述
     */
    private String serviceDescription;

    /**
     * 服务分类ID
     */
    private Long categoryId;

    /**
     * 计费类型
     */
    private String serviceType;

    /**
     * 基础价格
     */
    private BigDecimal basePrice;

    /**
     * 最小时长(小时)
     */
    private Integer minDuration;

    /**
     * 最大时长(小时)
     */
    private Integer maxDuration;

    /**
     * 封面图片
     */
    private String coverImage;

    /**
     * 服务图片集(JSON)
     */
    private String images;

    /**
     * 服务标签(JSON)
     */
    private String tags;

    /**
     * 服务要求
     */
    private String requirements;

    /**
     * 服务特色(JSON)
     */
    private String features;

    /**
     * 服务状态
     */
    private String status;

    /**
     * 显示顺序
     */
    private Integer displayOrder;

    /**
     * 是否推荐
     */
    private Boolean isRecommended;

    /**
     * 是否热门
     */
    private Boolean isHot;

    /**
     * 浏览次数
     */
    private Integer viewCount;

    /**
     * 订单次数
     */
    private Integer orderCount;

    /**
     * 平均评分
     */
    private BigDecimal ratingAverage;

    /**
     * 评价数量
     */
    private Integer ratingCount;

    /**
     * 创建人ID
     */
    private Long createdBy;

    // 常量定义
    public static class ServiceType {
        public static final String HOURLY = "hourly";
        public static final String FIXED = "fixed";
    }

    public static class Status {
        public static final String DRAFT = "draft";
        public static final String ACTIVE = "active";
        public static final String INACTIVE = "inactive";
        public static final String DISCONTINUED = "discontinued";
    }
}